﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace TimberSmart.Model.Security
{
    public class Menu
    {
        public int Id { get; set; }

        [Required, MaxLength(100)]
        public string InternalName { get; set; }

        [Required, MaxLength(20)]
        public string DisplayName { get; set; }

        [Required, MaxLength(100)]
        public string Description { get; set; }

        [MaxLength(30)]
        public string Action { get; set; }

        public int? ParentId { get; set; }
        public virtual Menu Parent { get; set; }

        public virtual ICollection<Menu> Children { get; set; }

        public virtual ICollection<Role> Roles { get; set; }
    }
}
